/*=========================================================================
Elite College as Engines of Upward Mobility: Evidence from Colombia's Ser Pilo Paga
Authors: Juliana Londoño-Vélez, Catherine Rodriguez, Fabio Sánchez
and Luis Esteban Álvarez-Arango

Creation date: June 6th, 2025
--------------------------------------------------------------------------
Figures D1a D1b D1c D1d D1e D1f and D1g 
=========================================================================*/

use "${Intermediate}/va_prog", replace

local models aa a b c d e f
local figs "D1a" "D1b" "D1c" "D1d" "D1e" "D1f" "D1g" 
local i=1
foreach m of local models{
	local fn: word `i' of "`figs'"
	local p=10
	local f %2.1f
	local t "Earnings"

	twoway (kdensity mw_9_`m'_va if categoria=="hq_pri", lcolor(gs0) lwidth(vthick)) (kdensity mw_9_`m'_va if categoria=="hq_pub", lcolor(gs10) lwidth(vthick)) (kdensity mw_9_`m'_va if categoria=="lq_pri", lcolor(gs0) lpattern(dash) lwidth(vthick)) (kdensity mw_9_`m'_va if categoria=="lq_pub", lcolor(gs10) lpattern(dash) lwidth(vthick)), legend(order(1 "HQ Private" 2 "HQ Public" 3 "LQ Private" 4 "LQ Public") position(`p') ring(0) col(1)) xtitle("`t' value-added") ytitle("Kernel density", size(small)) ylab(, labsize(vsmall) ) xlab(, labsize(small) format(`f')) title("") 
	graph export "${outcomes}/Fig`fn'.pdf", replace 
	local i=`i'+1
}